Shortcut menus are displayed
at or near the location of your cursor when you right-click on the
pointing device. The shortcut menu and the options it provides depend
on the location of the cursor and other conditions, such as whether
an object is selected or a command is in progress.
Context-sensitive shortcut menus
display menu options that are relative to the current command or
the selected object when you right-click.
Shortcut Menu Aliases
Shortcut menus are referenced by their
aliases and are used in specific situations. In the Customize User
Interface (CUI) Editor, the alias names must follow the proper naming
conventions. For example, the shortcut menu named “Default
Menu” displays the following information in the Aliases
section of the Properties pane:
POP501, CMDEFAULT
CMDEFAULT is
one of the reserved aliases that the program looks for in specific situations.
In this case, the shortcut menu assigned the alias CMDEFAULT is displayed if no objects
are selected and no command is in progress when you right-click
over the drawing window.
Aliases for context-sensitive
shortcut menus must be numbered between POP500 and POP999, with the exception of the Object
Snap menu which uses an alias of POP0.
The following aliases are reserved for use by the program:
Program aliases for shortcut
menus
|
Alias
|
Description
|
GRIPS
|
Defines the Hot Grip
shortcut menu. (Right-click the drawing area while a grip on an
object is selected.)
|
CMDEFAULT
|
Defines the Default mode
shortcut menu. (Right-click the drawing area while no command is
active and no objects are selected.)
|
CMEDIT
|
Defines the Edit mode
shortcut menu. (Right-click the drawing area while one or more objects
are selected, no grips are selected, and no command is active.)
|
CMCOMMAND
|
Defines the Command mode menu. (Right-click
the drawing area while a command is active.) In addition to the
content of the CMCOMMAND menu,
the command’s options (keywords within the square brackets) are
inserted into this menu.
|
SNAP
|
Defines the Object Snap
menu. (Shift+right-click the drawing area.)
|
Object Specific Shortcut
Menus
The CMEDIT and CMCOMMAND shortcut
menus can be made context-sensitive. In addition to the content
of the CMEDIT menu, the
appropriate object menu (if it exists) is inserted into this menu
when one or more of a specific object type are selected. Object
menus use either of the following naming conventions:
OBJECT_objectname
OBJECTS_objectname
If a single object is
selected, the OBJECT_objectname menu
is used, and if more than one of the same object type is selected,
the OBJECTS_objectname menu
is used. If no OBJECT_objectname is
available, the program uses the OBJECTS_objectname menu
(if it exists).
The object name used for the alias is the drawing
interchange format (DXF™) name
of the object in most cases except for inserted objects. The following table
shows the object names that are specific to inserted objects (blocks, dynamic
blocks, and xrefs).
Object names specific to insert objects
|
Object Name
|
Description
|
ATTBLOCKREF
|
Block reference with attributes
|
ATTDYNBLOCKREF
|
Dynamic block reference with attributes
|
BLOCKREF
|
Block reference without attributes
|
DYNBLOCKREF
|
Dynamic block reference without attributes
|
XREF
|
External reference (xref)
|
For example, to support
an object-specific shortcut menu for one or more selected block
references, you would create or modify a shortcut menu and change
its properties to those in the following table. The important property to
change is Aliases, which would need to modified to include the alias OBJECTS_BLOCKREF.
Properties for the Block
Reference Objects shortcut menu
|
Properties pane item
|
Description
|
Example
|
Name
|
String that is only used
in the CUI Editor and is not displayed in the user interface.
|
Block Objects Menu
|
Description
|
Text used to describe
the element; does not appear in the user interface.
|
Shortcut menu for block
objects
|
Aliases
|
Specifies the aliases
for the shortcut menu. Click the […] button to open the Aliases dialog box. Each
alias in the CUIx file should be unique and it is used to reference
the shortcut menu programmatically.
|
POP512,OBJECTS_BLOCKREF
|
Element ID
|
Tag that uniquely identifies
a shortcut menu.
|
PM_0021
|
Command Specific Shortcut
Menus
Like the CMEDIT menu, the CMCOMMAND menu
can contain context-sensitive commands. Menus named COMMAND_commandname control
which commands are appended to the CMCOMMAND menu
when a command is active. The text of commandname can
be any valid AutoCAD command, including custom-defined or third-party
commands.
In many cases, you can
enter a hyphen before a command to suppress the display of a dialog
box and display prompts for the command instead. To create a context-sensitive
menu for a command that displays prompts instead of a dialog box
(such as -INSERT), you need
to name the menu COMMAND_-INSERT.
To create a shortcut menu
Do one of the following:
To create a standard shortcut
menu
-
- In the Customize User Interface Editor,
Customize tab, in the Customizations In <file name> pane,
right-click Shortcut Menus. Click New Shortcut Menu.
The new shortcut menu
(named ShortcutMenu1) is placed at the bottom of the Menus tree.
- Do one of the following:
- Enter a new name over the default name
ShortcutMenu1.
- Right-click ShortcutMenu1. Click Rename.
Enter a new shortcut menu name.
- Click ShortcutMenu1, wait, and click
again over the shortcut menu’s name to edit its name in-place.
- In the Properties pane, Description box,
optionally enter a description for the shortcut menu.
- In the Aliases box, click the […] button.
- In the Aliases dialog box, press Enter
so you are on a new line. Enter additional aliases for the menu,
and after each one, press Enter. An alias is automatically assigned,
and defaults to the next available POP number, based on the number
of shortcut menus already loaded in the program.
- In the Command List pane, drag the command
that you want to add to the location just below the shortcut menu
in the Customizations In <file name> pane.
- Continue adding commands until the new
shortcut menu is complete.
- Click Apply.
To create a command shortcut
menu
In order for the commands
on the shortcut menu to appear when a command is active, make sure
to use the alias COMMAND_commandname. For example, if you
want the commands on the shortcut menu to appear when using the
LINE command use the alias COMMAND_LINE. The commands from the shortcut
menu will appear at the bottom of the shortcut menu with the alias
CMCOMMAND when it is displayed.
-
- In the Customize User Interface Editor,
Customize tab, in the Customizations In <file name> pane,
right-click Shortcut Menus. Click New Shortcut Menu.
The new shortcut menu
(named ShortcutMenu1) is placed at the bottom of the Menus tree.
- Do one of the following:
- Enter a new name over the default name
ShortcutMenu1.
- Right-click ShortcutMenu1. Click Rename.
Enter a new shortcut menu name.
- Click ShortcutMenu1, wait, and click
again over the shortcut menu’s name to edit its name in-place.
- In the Properties pane, Description box,
optionally enter a description for the shortcut menu.
- In the Aliases box, click the […] button.
- In the Aliases dialog box, press Enter
so you are on a new line. Enter additional aliases for the menu,
and after each one, press Enter. An alias is automatically assigned,
and defaults to the next available POP number, based on the number
of shortcut menus already loaded in the program.
- In the Command List pane, drag the command
that you want to add to the location just below the shortcut menu
in the Customizations In <file name> pane.
- Continue adding commands until the new
shortcut menu is complete.
- Click Apply.
To create an object shortcut
menu
In order for the commands
on the shortcut menu to appear when an object or objects of the
same type are selected, make sure to use the alias OBJECT_objecttype or
OBJECTS_objecttype. For example, if you
want the commands on the shortcut menu to appear when a LINE object
is selected in the drawing, use the alias OBJECT_LINE. The commands
from the shortcut menu will appear near the top of the shortcut
menu with the alias CMEDIT when it is displayed.
-
- In the Customize User Interface Editor,
Customize tab, in the Customizations In <file name> pane,
right-click Shortcut Menus. Click New Shortcut Menu.
The new shortcut menu
(named ShortcutMenu1) is placed at the bottom of the Menus tree.
- Do one of the following:
- Enter a new name over the default name
ShortcutMenu1.
- Right-click ShortcutMenu1. Click Rename.
Enter a new shortcut menu name.
- Click ShortcutMenu1, wait, and click
again over the shortcut menu’s name to edit its name in-place.
- In the Properties pane, Description box,
optionally enter a description for the shortcut menu.
- In the Aliases box, click the […] button.
- In the Aliases dialog box, press Enter
so you are on a new line. Enter additional aliases for the menu,
and after each one, press Enter. An alias is automatically assigned,
and defaults to the next available POP number, based on the number
of shortcut menus already loaded in the program.
NoteIf you create a shortcut
menu with the alias OBJECTS_objecttype,
the commands assigned to the shortcut menu will be displayed when
one or more objects are selected before right-clicking over the
drawing area.
- In the Command List pane, drag the command
that you want to add to the location just below the shortcut menu
in the Customizations In <file name> pane.
- Continue adding commands until the new
shortcut menu is complete.
- Click Apply.
To add a command to a shortcut
menu
-
- In the Customize User Interface Editor,
Customize tab, in the Customizations In <file name> pane,
click the menu to which you want to add a command.
- In the Command List pane, drag the command
you want to add to a location just below the menu in the Customizations
In <file name> pane.
NoteYou can change the
name of a command after it has been added to a menu. This allows
you to define how the user can access the menu item using keyboard
navigation with the Alt key. To do this, select the menu item under the
Shortcut Menus node and then change the Name property in the Properties
pane.
- Click Apply.
For information about
creating a command, see
Create, Edit, and Reuse Commands.
To change the caption of
a menu item on a shortcut menu
-
- In the Customize User Interface Editor,
Customize tab, in the Customizations In <file name> pane,
click the plus sign (+) next to the Shortcut Menus node to expand
it.
- Click the plus sign (+) next to the shortcut
menu that has the command whose text you want to change.
- Select the command whose text you want
to change.
- In the Properties pane, in the Display
section, make the desired change to the Name property (not the Command
Name or Command Display Name properties).
- Click Apply.
CommandsCUI
Manages the customized
user interface elements in the product.
System VariablesSHORTCUTMENU
Controls whether Default,
Edit, and Command mode shortcut menus are available in the drawing
area.